import Layout from '@/layout'
import Home from '../views/Home.vue'

const platform = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/user',
    // 路由元信息
    meta: {
      title: '平台管理',
      icon: 'el-icon-message'
    },
    children: [
      {
        path: '/dashboard',
        name: 'Dashboard',
        component: Home,
        meta: {
          title: '公告管理',
          icon: 'el-icon-s-flag'
        }
      },
      {
        path: '/user',
        name: 'User',
        component: () => import('../views/user.vue'),
        meta: {
          title: '用户管理',
          icon: 'el-icon-user'
        }
      },
      {
        path: '/role',
        name: 'Role',
        component: () => import('../views/role.vue'),
        meta: {
          title: '角色档案',
          icon: 'el-icon-setting'
        }
      },
      {
        path: '/permission',
        name: 'Permission',
        component: () => import('../views/permission.vue'),
        meta: {
          title: '权限管理',
          icon: 'el-icon-s-tools'
        }
      }
    ]
  }
]

export default platform